//
//  JLSHomeLabel.m
//  看点
//
//  Created by 焦林生 on 15/12/16.
//  Copyright © 2015年 jiaolinsheng. All rights reserved.
//

#import "JLSHomeLabel.h"

@implementation JLSHomeLabel

- (instancetype)initWithFrame:(CGRect)frame
{

    if (self = [super initWithFrame:frame]) {
        self.textAlignment = NSTextAlignmentCenter;
        self.font = [UIFont systemFontOfSize:20];
        self.userInteractionEnabled = YES;
        self.scale = 0.0;
        
    }
    return self;
}

- (void)setScale:(CGFloat)scale
{

    _scale = scale;
    
    
    
    // 颜色渐变
    self.textColor = [UIColor colorWithRed:scale green:0.0 blue:0.0 alpha:1.0];
    
    // 大小渐变 [0.7 - 1.0]
    CGFloat minWHScale = 0.7;
    CGFloat whScale = minWHScale + scale * (1 - minWHScale);
    self.transform = CGAffineTransformMakeScale(whScale, whScale);
}

@end
